<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateGameListsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('game_lists', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('unique_key', 64)->nullable()->comment('唯一键');
			$table->string('main_game_plat_code', 64)->comment('游戏平台');
			$table->string('cn_name', 128)->nullable()->comment('中文名');
			$table->string('en_name', 128)->nullable()->comment('英文名');
			$table->string('pc_game_code', 64)->nullable()->comment('编号');
			$table->string('pc_game_deputy_code', 64)->nullable()->comment('编号扩展');
			$table->string('mobile_game_code', 64)->nullable()->comment('移动端编号');
			$table->string('mobile_game_deputy_code', 64)->nullable()->comment('移动端编号扩展');
			$table->string('record_match_code', 128)->nullable()->comment('匹配编号');
			$table->string('record_match_deputy_code', 128)->nullable()->comment('匹配编号扩展');
			$table->string('img1', 256)->nullable()->comment('图片1');
			$table->string('img2', 256)->nullable()->comment('图片2');
			$table->string('type', 32)->nullable()->comment('游戏类型');
			$table->string('category', 32)->nullable()->comment('游戏分类');
			$table->boolean('status')->default(0)->comment('状态(0：关闭；1：启用；2：维护)');
			$table->boolean('line_num')->nullable()->default(0)->comment('线数');
			$table->decimal('money_return_rate', 4, 3)->default(0.000)->comment('返奖率');
			$table->decimal('bonus_pool', 13, 3)->default(0.000)->comment('奖金池');
			$table->boolean('able_demo')->default(0)->comment('能否试玩');
			$table->boolean('able_recommend')->default(0)->comment('可否推荐');
			$table->boolean('is_lobby')->default(0)->comment('是否是大厅');
			$table->softDeletes();
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('game_lists');
	}

}
